import "@/utils/css/swiper.min.css";
import "@/utils/css/index.css";
import "./index.less";
require("@/utils/js/index.js");

import {
  tabPosition
} from "@/utils/js/tab.js";
import {
  resizeWindow
} from "@/utils/js/window.js";
import {
  request
} from "@/utils/js/share.js";

$(function () {
  resizeWindow('gaokaohou');
  let tabHeight = $('#tab').height();
  let domList = ['#section1', '#section2', '#section3', '#section4', '#section5', '#section6'];
  var domHeightList = [];
  tabPosition(domList, domHeightList, tabHeight);
  let swiper = new Swiper(".swiper-container2", {
    slidesPerView: document.documentElement.clientWidth > 979 ? 4 : 2,
    pagination: ".swiper-pagination2",
  })
  let swiper2 = new Swiper(".swiper-container3", {
    slidesPerView:  2,
    pagination: ".swiper-pagination3",
  })

  $(".t-content > .t-list").click(function () {
    $(this).addClass("t-list-active").siblings().removeClass("t-list-active");
  }).mouseleave(function () {
    $(this).removeClass("t-list-active");
  })

  $(".th-content1 > .th-content-tab > .th-content-tab-list").mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $("#thContent1").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
   })

   $(".th-content2 > .th-btn > div").click(function() {
    $(".th-content2-detail").find(`.th-content2-detail-list:eq(${$(this).index()})`).addClass("th-content2-detail-list-active").siblings().removeClass("th-content2-detail-list-active");
   })

   $(".th-content3 > .th-btn > div").click(function() {
    $(".th-content3-detail").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
   })

   $('.th-content2-detail-list1 .th-content-tab-list').mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $(".th-content2-detail-list1 .th-tab-list").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
  })

  $('.th-content2-detail-list2 .th-content-tab-list').mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $(".th-content2-detail-list2 .th-tab-list").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
  })


})